package com.ourhealth.service.impl;

import com.alibaba.dubbo.config.annotation.Service;
import com.ourhealth.mapper.LoginMapper;
import com.ourhealth.pojo.Member;
import com.ourhealth.service.LoginService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.transaction.annotation.Transactional;

/**
 * @author dddddh
 */
@Service(interfaceClass = LoginService.class)
@Transactional(rollbackFor = RuntimeException.class)
public class LoginServiceImpl implements LoginService {
    @Autowired
    private LoginMapper loginMapper;

    @Override
    public Member findMemberByTelephone(String telephone) {
        Member member = loginMapper.findMemberByTelephone(telephone);
        return member;
    }

    @Override
    public void addMember(Member member) {
        loginMapper.addMember(member);
    }
}
